package com.skygrass.caesar.consumer.fallback;

import java.util.Map;

import com.netflix.hystrix.HystrixInvokableInfo;
import com.netflix.ribbon.hystrix.FallbackHandler;

import rx.Observable;
import rx.Observable.OnSubscribe;
import rx.Subscriber;

public class ConsumerControllerFallbackHandle implements FallbackHandler<String>
{

	@Override
	public Observable<String> getFallback(HystrixInvokableInfo<?> hystrixInfo, Map<String, Object> requestProperties)
	{
		// TODO Auto-generated method stub
		return Observable.create(new OnSubscribe<String>() {
			@Override
			public void call(Subscriber<? super String> t)
			{
				// TODO Auto-generated method stub
				System.out.println("ConsumerControllerFallbackHandle");
			}
		});
	}

}
